﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demos.DesignPatterns._21_观察者模式
{

    /// <summary>
    /// 用户通知服务
    /// </summary>
    public class UserNotificationService: IOrderObserver
    {

        public void Update(TOrderModel order)
        {
            Console.WriteLine($"[用户通知] 订单 {order.OrderId} 状态变更为: {order.Status}");
            Console.WriteLine($"已发送邮件到: {order.CustomerEmail}\n");
        }
    }
}
